{% extends "base.html" %}
{% load static debate_tags add_field_css i18n %}

{% block head-title %}<span class="emoji">🏫</span> {% trans "Add Institutions" context "page title" %}
{% blocktrans trimmed with step=wizard.steps.step1 count=wizard.steps.count %}(Step {{ step }} of {{ count }}){% endblocktrans %}{% endblock %}
{% block page-title %}{% trans "Add Institutions" context "page title" %}{% endblock %}

{% block content %}

<div class="card">
  <form action="." method="POST">
  {% csrf_token %}
    <div class="list-group list-group-flush">

      {% include "components/form-title.html" with text="Paste a list of institutions with one institution per line and following the format of: <code>full name,code</code>. Teams marked as using an institutional prefix will use the institution's code for this purpose, ie 'MUDS 1'. For example:" %}

      <div class="list-group-item list-group-item-secondary pt-0 pb-0">
        <pre><code>
Victoria University of Wellington,VIC
University of Melbourne,MUDS
Universiti Teknologi MARA,UTMARA</code></pre>
      </div>

      <div class="list-group-item pb-3 pt-3">

        {{ wizard.management_form }}

        {% if wizard.form.institutions_raw.errors %}
          <div class="alert alert-danger">
            <p>{% trans "There are some problems with the data on this form:" %}</p>
            {{ wizard.form.institutions_raw.errors }}
          </div>
        {% endif %}

        <div class="form-group">
          {{ wizard.form.institutions_raw|addcss:"form-control" }}
        </div>

      </div>

      {% trans "Next Step" as title %}
      {% include "components/form-submit.html" %}

    </div>
  </form>

</div>


{% endblock content %}
